FHIR © HL7.org  |  Server Home  |  FHIR Server FHIR Server 3.7.16  |  FHIR Version n/a  User: [n/a]

Resource StructureDefinition/FHIR Server from package uk.nhsdigital.r4.test#2.15.0-prerelease (172 ms)

Package uk.nhsdigital.r4.test
Type StructureDefinition
Id Id
FHIR Version R4
Source https://simplifier.net/resolve?scope=uk.nhsdigital.r4.test@2.15.0-prerelease&canonical=https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense
Url https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense
Version 1.0.2
Status draft
Date 2025-04-03T13:51:00+00:00
Name NHSDigitalMedicationDispense
Title NHS Digital MedicationDispense
Experimental False
Description This profile defines the NHS England constraints and extensions on the International FHIR resource [MedicationDispense](https://hl7.org/fhir/R4/medicationdispense.html).
Purpose This profile is used to facilitate the management of the dispense lifecyle processes of a prescription.
Copyright Copyright © 2025+ NHS England Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html.
Type MedicationDispense
Kind resource

Resources that use this resource

CapabilityStatement
https://fhir.nhs.uk/CapabilityStatement/nhsdigital-eps-requirements NHSDigitalEPSRequirements
https://fhir.nhs.uk/CapabilityStatement/apim-eps-futures APIMEPSFutures
https://fhir.nhs.uk/CapabilityStatement/apim-eps-nextgen APIMEPSNextGen
https://fhir.nhs.uk/CapabilityStatement/apim-medicines-api-example APIMEPS
https://fhir.nhs.uk/CapabilityStatement/nhsdigital-requirements NHSDigitalRequirements
https://fhir.nhs.uk/StructureDefinition/Extension-ClaimMedicationDispenseReference ExtensionClaimMedicationDispenseReference
https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Message NHSDigitalMedicationDispenseMessage

Resources that this resource uses

StructureDefinition
https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionNonDispensingReason ExtensionPrescriptionNonDispensingReason
https://fhir.nhs.uk/StructureDefinition/Extension-DM-RunningTotal ExtensionDMRunningTotal
https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation Extension EPS RepeatInformation
https://fhir.nhs.uk/StructureDefinition/Extension-EPS-SupplyHeaderIdentifier ExtensionSupplyHeaderIdentifier
https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatus Extension EPS Task Business Status
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Dosage NHSDigitalDosage
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Encounter NHSDigitalEncounter
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Location NHSDigitalLocation
https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-CodeableConcept NHSDigitalMedicationDispenseCodeableConcept
https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Medication NHSDigitalMedicationDispenseMedication
https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Minimal NHSDigitalMedicationRequestMinimal
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient-PDS NHSDigitalPatientPDS
https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-SDS NHSDigitalPractitionerRoleSDS
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Reference NHSDigitalReference
https://fhir.nhs.uk/ValueSet/DM-medicationdispense-status-reason MedicationDispenseStatusReason
https://fhir.nhs.uk/ValueSet/DM-medicationdispense-type England DM Medication Dispense Status
https://fhir.nhs.uk/ValueSet/DM-task-reason-code TaskReasonCode
https://fhir.nhs.uk/ValueSet/NHSDigital-MedicationCode NHS Digital Medication Code


Source

{
  "resourceType" : "StructureDefinition",
  "id" : "NHSDigital-MedicationDispense",
  "url" : "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense",
  "version" : "1.0.2",
  "name" : "NHSDigitalMedicationDispense",
  "title" : "NHS Digital MedicationDispense",
  "status" : "draft",
  "date" : "2025-04-03T13:51:00+00:00",
  "publisher" : "NHS England",
  "contact" : [
    {
      "name" : "NHS England",
      "telecom" : [
        {
          "system" : "email",
          "value" : "interoperabilityteam@nhs.net",
          "use" : "work",
          "rank" : 1
        }
      ]
    }
  ],
  "description" : "This profile defines the NHS England constraints and extensions on the International FHIR resource [MedicationDispense](https://hl7.org/fhir/R4/medicationdispense.html).",
  "purpose" : "This profile is used to facilitate the management of the dispense lifecyle processes of a prescription.",
  "copyright" : "Copyright © 2025+ NHS England Licensed under the Apache License, Version 2.0 (the \\"License\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html.",
  "fhirVersion" : "4.0.1",
  "kind" : "resource",
  "abstract" : false,
  "type" : "MedicationDispense",
  "baseDefinition" : "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationDispense",
  "derivation" : "constraint",
  "differential" : {
    "element" : [
      {
        "id" : "MedicationDispense.extension:prescriptionNonDispensingReason",
        "path" : "MedicationDispense.extension",
        "sliceName" : "prescriptionNonDispensingReason",
        "short" : "This is the non dispensing reason for the overall prescription",
        "definition" : "This is the reason a complete prescription was not dispensed, it is not the status of the individual line items, which is contained in MedicationDispense.statusReason.\r\n\r\n```json\r\n\"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionNonDispensingReason\",\r\n \"valueCoding\": {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/medicationdispense-status-reason\",\r\n \"code\": \"0002\",\r\n \"display\": \"Clinically unsuitable\"\r\n }\r\n }\r\n]\r\n```",
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionNonDispensingReason"
            ]
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.extension:prescriptionStatus",
        "path" : "MedicationDispense.extension",
        "sliceName" : "prescriptionStatus",
        "definition" : "This is the overall status of the prescription-order, it is not the status of the individual prescription item. This is a code from {{pagelink:DM-Task-Status-Reason-duplicate-2}}, all prescription status reasons in a dispense-notification FHIR Message Bundle must be the same.\r\n```json\r\n\"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatus\",\r\n \"valueCoding\": {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/EPS-task-business-status\",\r\n \"code\": \"0003\",\r\n \"display\": \"With Dispenser - Active\"\r\n }\r\n }\r\n]\r\n````",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatus"
            ]
          }
        ],
        "isModifier" : false
      },
      {
        "id" : "MedicationDispense.extension:repeatInformation",
        "path" : "MedicationDispense.extension",
        "sliceName" : "repeatInformation",
        "short" : "Repeat Prescribing and Dispensing",
        "definition" : "The extension is mandatory for `continuous` and `continuous-repeat-dispensing`. The following elements **MUST** be populated \r\n\r\n- numberofRepeatsAllowed \r\n- numberOfRepeatsIssued \r\n\r\n```json\r\n\"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation\",\r\n \"extension\": [\r\n {\r\n \"url\" : \"numberOfRepeatsAllowed\",\r\n \"valueInteger\" : 3\r\n },\r\n {\r\n \"url\" : \"numberOfRepeatsIssued\",\r\n \"valueInteger\" : 2\r\n }\r\n ]\r\n }\r\n]\r\n```",
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation"
            ]
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.extension:supplyHeaderIdentifier",
        "path" : "MedicationDispense.extension",
        "sliceName" : "supplyHeaderIdentifier",
        "short" : "Identifier for the SupplyHeader",
        "definition" : "Identifier of the SupplyHeader (v3) object. The prescription in the context of a Dispense Notification or Claim. Mandatory for EPS interactions.",
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-SupplyHeaderIdentifier"
            ]
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.identifier",
        "path" : "MedicationDispense.identifier",
        "definition" : "Each MedicationDispense **MUST** be identified by an Universal Unique Identifiers (UUIDs) with a system of `https://fhir.nhs.uk/Id/prescription-dispense-item-number`\r\n\r\nUUID example (for illustration purposes only);\r\n\r\n**4509B70D-D8B8-EA03-1105-64557CB54A29**\r\n\r\n\r\n```json\r\n \"identifier\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/Id/prescription-dispense-item-number\",\r\n \"value\": \"4509B70D-D8B8-EA03-1105-64557CB54A29\"\r\n }\r\n]\r\n```",
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.identifier.system",
        "path" : "MedicationDispense.identifier.system",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.identifier.value",
        "path" : "MedicationDispense.identifier.value",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.status",
        "path" : "MedicationDispense.status",
        "definition" : "The status of the individual medication item, this will normally indicate whether the medication has been picked up or not. \r\n\r\n| Code | Display | Definition |\r\n|--|--|--|\r\n| completed | Completed | The dispensed product has been picked up. |\r\n| in-progress | In Progress | The dispensed product is ready for pickup. |\r\n\r\n\r\n<img src=\"https://raw.githubusercontent.com/NHSDigital/NHSDigital-FHIR-Medicines-ImplementationGuide/master/Diagrams/medication-dispense-status-flow.png\" width=\"100%\" hieght=\"auto\"/>",
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.statusReason[x]",
        "path" : "MedicationDispense.statusReason[x]",
        "type" : [
          {
            "code" : "CodeableConcept"
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.statusReason[x].coding",
        "path" : "MedicationDispense.statusReason[x].coding",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "system"
            }
          ],
          "rules" : "open"
        },
        "min" : 1
      },
      {
        "id" : "MedicationDispense.statusReason[x].coding.system",
        "path" : "MedicationDispense.statusReason[x].coding.system",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.statusReason[x].coding.code",
        "path" : "MedicationDispense.statusReason[x].coding.code",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.statusReason[x].coding:notDispensedStatusReason",
        "path" : "MedicationDispense.statusReason[x].coding",
        "sliceName" : "notDispensedStatusReason",
        "mustSupport" : true,
        "binding" : {
          "strength" : "required",
          "valueSet" : "https://fhir.nhs.uk/ValueSet/DM-medicationdispense-status-reason"
        }
      },
      {
        "id" : "MedicationDispense.statusReason[x].coding:notDispensedStatusReason.system",
        "path" : "MedicationDispense.statusReason[x].coding.system",
        "fixedUri" : "https://fhir.nhs.uk/CodeSystem/medicationdispense-status-reason"
      },
      {
        "id" : "MedicationDispense.statusReason[x].coding:amendmentStatusReason",
        "path" : "MedicationDispense.statusReason[x].coding",
        "sliceName" : "amendmentStatusReason",
        "mustSupport" : true,
        "binding" : {
          "strength" : "required",
          "valueSet" : "https://fhir.nhs.uk/ValueSet/DM-task-reason-code"
        }
      },
      {
        "id" : "MedicationDispense.statusReason[x].coding:amendmentStatusReason.system",
        "path" : "MedicationDispense.statusReason[x].coding.system",
        "fixedUri" : "https://fhir.nhs.uk/CodeSystem/EPS-task-dispense-withdraw-reason"
      },
      {
        "id" : "MedicationDispense.category.coding.system",
        "path" : "MedicationDispense.category.coding.system",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.category.coding.code",
        "path" : "MedicationDispense.category.coding.code",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.medication[x]",
        "path" : "MedicationDispense.medication[x]",
        "definition" : "Actual Medical Product Packs (AMPP) SHOULD be used. \r\nIt is valid to include a FHIR Medication resource within the FHIR Message, this practice is discouraged to simplify handling of the event messages.\r\n\r\n<table>\r\n<thead>\r\n<th data-no-sort width=\"25%\">\r\ndm+d Category\r\n</th>\r\n<th data-no-sort width=\"50%\">\r\ndm+d Description\r\n</th>\r\n<th data-no-sort width=\"25%\">\r\nUK SNOMED Members Of\r\n</th>\r\n\r\n</thead>\r\n<tr>\r\n<td>\r\nVMPP\r\n</td>\r\n<td>\r\nVirtual Medical Product Pack\r\n</td>\r\n<td>\r\n<a href=\"https://termbrowser.nhs.uk/?perspective=full&conceptId1=999000571000001104\" target=\"_blank\">999000571000001104</a>\r\n</td>\r\n\r\n</tr>\r\n<tr>\r\n<td>\r\nAMPP\r\n</td>\r\n<td>\r\nActual Medical Product Pack\r\n</td>\r\n<td>\r\n<a href=\"https://termbrowser.nhs.uk/?perspective=full&conceptId1=999000551000001106\" target=\"_blank\">999000551000001106</a>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\nVMP\r\n</td>\r\n<td>\r\nVirtual Medical Product\r\n</td>\r\n<td>\r\n<a href=\"https://termbrowser.nhs.uk/?perspective=full&conceptId1=999000561000001109\" target=\"_blank\">999000561000001109</a>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\nAMP\r\n</td>\r\n<td>\r\nActual Medical Product\r\n</td>\r\n<td>\r\n<a href=\"https://termbrowser.nhs.uk/?perspective=full&conceptId1=999000541000001108\" target=\"_blank\">999000541000001108</a>\r\n</td>\r\n</tr>\r\n</table>\r\n\r\n<br>\r\n\r\n```json\r\n\"medicationCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"10460811000001109\",\r\n \"display\": \"Amoxil 500mg capsules (Dowelhurst Ltd) 12 capsule\"\r\n }\r\n ]\r\n}\r\n```",
        "type" : [
          {
            "code" : "CodeableConcept",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-CodeableConcept"
            ]
          },
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationDispense-Medication"
            ],
            "aggregation" : [
              "bundled"
            ]
          }
        ],
        "mustSupport" : true,
        "binding" : {
          "strength" : "extensible",
          "valueSet" : "https://fhir.nhs.uk/ValueSet/NHSDigital-MedicationCode"
        }
      },
      {
        "id" : "MedicationDispense.subject",
        "path" : "MedicationDispense.subject",
        "definition" : "A reference to the patient via a traced NHS Number is required, an untraced NHS Number MUST NOT be used. This can be sent in two ways, first option is via a `identifier reference`. Only the NHS Number:\r\n\r\n```json\r\n\"subject\": {\r\n \"type\": \"Patient\",\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\r\n \"value\": \"2300992742\"\r\n }\r\n}\r\n```\r\n\r\nSecond option uses a FHIR Patient resource to convey the NHS Number. \r\n\r\nThe reference in the MedicationDispesnse is now a `resource reference`. \r\n\r\n```json\r\n \"subject\": {\r\n \"type\": \"Patient\",\r\n \"reference\": \"urn:uuid:bde9eba6-079f-4210-8108-6ea8db58de8c\",\r\n \"display\": \"Miss Bernie Kanfeld\"\r\n }\r\n```\r\n\r\nThe NHS Number has moved to the Patient resource alongside other patient identifiers such as MRN. E.g. \r\n\r\n```json\r\n\"fullUrl\": \"urn:uuid:bde9eba6-079f-4210-8108-6ea8db58de8c\",\r\n\"resource\": {\r\n \"resourceType\": \"Patient\",\r\n \"identifier\": [\r\n {\r\n \"extension\": [\r\n {\r\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus\",\r\n \"code\": \"01\",\r\n \"display\": \"Number present and verified\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\r\n \"value\": \"9876543210\"\r\n },\r\n {\r\n \"system\": \"https://fhir.leedsth.nhs.uk/Id/pas-number\",\r\n \"value\": \"ABC8650149\"\r\n },\r\n {\r\n \"system\": \"https://fhir.leedsth.nhs.uk/Id/PPMIdentifier\",\r\n \"value\": \"1\"\r\n }\r\n ],\r\n ... other elements removed from example.\r\n }\r\n```\r\n\r\nIt is anticipated that hospital pharmacies will prefer the later option for compatibility with other systems. Community pharmacies are anticipated to prefer the former option.",
        "min" : 1,
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient-PDS"
            ],
            "aggregation" : [
              "referenced",
              "bundled"
            ]
          }
        ],
        "constraint" : [
          {
            "key" : "eps-2",
            "severity" : "warning",
            "human" : "subject - An identifier reference or resource reference must be provided",
            "expression" : "(reference.exists() or (identifier.exists()))"
          },
          {
            "key" : "patient-nhs",
            "severity" : "error",
            "human" : "Length of the supplied NHS Number is wrong.",
            "expression" : "identifier.where(system='https://fhir.nhs.uk/Id/nhs-number').exists().not() or (identifier.where(system='https://fhir.nhs.uk/Id/nhs-number').exists() and identifier.where(system='https://fhir.nhs.uk/Id/nhs-number').value.matches('^([0-9]{10})$'))"
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.subject.identifier.system",
        "path" : "MedicationDispense.subject.identifier.system",
        "min" : 1,
        "fixedUri" : "https://fhir.nhs.uk/Id/nhs-number"
      },
      {
        "id" : "MedicationDispense.subject.identifier.value",
        "path" : "MedicationDispense.subject.identifier.value",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.context",
        "path" : "MedicationDispense.context",
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-EpisodeOfCare",
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Encounter"
            ]
          }
        ]
      },
      {
        "id" : "MedicationDispense.performer",
        "path" : "MedicationDispense.performer",
        "definition" : "The pharmacist and pharmacy MUST be present and MUST use `identifier references`. This means FHIR Practitioner, Organization and PractitionerRole resource are not included in the FHIR Message. Professional codes and ODS codes should be used instead. `sds-user-role-id` is permitted to identify a Practitioner(& Role) but professional codes are preferred to support wider NHS interoperability.\r\n\r\n```json\r\n \"performer\": [\r\n {\r\n \"actor\": {\r\n \"reference\" : \"#performer\"\r\n }\r\n }\r\n],\r\n```\r\n\r\nThe contained PractitionerRole:\r\n\r\n```json\r\n{\r\n \"resourceType\": \"MedicationDispense\",\r\n \"id\": \"06167339-9337-d030-0366-514a6a46da17\",\r\n \"contained\": [\r\n {\r\n \"resourceType\": \"PractitionerRole\",\r\n \"id\": \"performer\",\r\n \"identifier\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/Id/sds-role-profile-id\",\r\n \"value\": \"741555508105\"\r\n }\r\n ],\r\n \"code\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/NHSDigital-SDS-JobRoleCode\",\r\n \"code\": \"S0030:G0100:R0620\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"practitioner\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/sds-user-id\",\r\n \"value\": \"7654321\"\r\n },\r\n \"display\": \"Mr Peter Potion\"\r\n },\r\n \"organization\": {\r\n \"reference\": \"urn:uuid:2bf9f37c-d88b-4f86-ad5f-373c1416e04b\"\r\n },\r\n \"telecom\": [\r\n {\r\n \"system\": \"phone\",\r\n \"use\": \"work\",\r\n \"value\": \"0532567890\"\r\n }\r\n ]\r\n }\r\n ],\r\n```",
        "min" : 1,
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.performer.actor",
        "path" : "MedicationDispense.performer.actor",
        "type" : [
          {
            "code" : "Reference",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Reference"
            ],
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-SDS"
            ]
          }
        ],
        "constraint" : [
          {
            "key" : "performer",
            "severity" : "error",
            "human" : "An identifier reference or resource reference must be provided",
            "expression" : "(reference.exists() or identifier.exists())"
          }
        ]
      },
      {
        "id" : "MedicationDispense.performer.actor.reference",
        "path" : "MedicationDispense.performer.actor.reference",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.performer.actor.identifier.system",
        "path" : "MedicationDispense.performer.actor.identifier.system",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.performer.actor.identifier.value",
        "path" : "MedicationDispense.performer.actor.identifier.value",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.location",
        "path" : "MedicationDispense.location",
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Location"
            ]
          }
        ]
      },
      {
        "id" : "MedicationDispense.location.identifier.system",
        "path" : "MedicationDispense.location.identifier.system",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.location.identifier.value",
        "path" : "MedicationDispense.location.identifier.value",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.location.display",
        "path" : "MedicationDispense.location.display",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.authorizingPrescription",
        "path" : "MedicationDispense.authorizingPrescription",
        "definition" : "A reference to the `MedicationRequest`. \r\n\r\n```json\r\n\"authorizingPrescription\": [\r\n {\r\n \"reference\": \"#m1\"\r\n }\r\n]\r\n```\r\n\r\nWhen a MedicationDispesne is sent in a FHIR Message bundle, which is the case with EPS NextGen `dispense-notifications`, a contained MedicationRequest is required. \r\n\r\nThis MedicationRequest **MUST** follow the rules in [NHSDigital-MedicationRequest](https://simplifier.net/resolve?target=simplifier&scope=uk.nhsdigital.r4&canonical=https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest) and it is strongly recommended to reuse the `MedicationRequest` received when the prescription was downloaded. \r\n\r\nFor example:\r\n\r\n```json \r\n{\r\n \"resourceType\": \"MedicationDispense\",\r\n \"contained\": [\r\n {\r\n \"resourceType\": \"MedicationRequest\",\r\n \"id\": \"m1\",\r\n \"identifier\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/Id/prescription-order-item-number\",\r\n \"value\": \"299c610b-f4f1-4eac-a7d7-4fb6b0556e11\"\r\n }\r\n ],\r\n \"status\": \"active\",\r\n \"intent\": \"order\",\r\n \"medicationCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"39720311000001101\",\r\n \"display\": \"Paracetamol 500mg soluble tablets\"\r\n }\r\n ]\r\n },\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\r\n \"value\": \"9876543210\"\r\n }\r\n },\r\n \"groupIdentifier\": {\r\n \"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId\",\r\n \"valueIdentifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/prescription\",\r\n \"value\": \"b2fc79f0-2793-4736-9b2d-0976c21e73a5\"\r\n }\r\n }\r\n ],\r\n \"system\": \"https://fhir.nhs.uk/Id/prescription-order-number\",\r\n \"value\": \"82D996-C81010-11DB12\"\r\n },\r\n \"dispenseRequest\": {\r\n \"quantity\": {\r\n \"value\": 100,\r\n \"unit\": \"tablet\",\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"732936001\"\r\n }\r\n },\r\n \"substitution\": {\r\n \"allowedBoolean\": false\r\n }\r\n }\r\n ],\r\n \"authorizingPrescription\": [\r\n {\r\n \"reference\": \"#m1\"\r\n }\r\n ],\r\n```\r\n\r\nThis is based on a `MedicationRequest` in this implementation guide.\r\nThe uuid resource references are not permitted and must be replaced with identifier references. E.g. in this section from the `$release` \r\n\r\n```json\r\n \"subject\": {\r\n \"reference\": \"urn:uuid:78d3c2eb-009e-4ec8-a358-b042954aa9b2\"\r\n },\r\n \"authoredOn\": \"2020-12-21T18:15:29+00:00\",\r\n \"requester\": {\r\n \"reference\": \"urn:uuid:56166769-c1c4-4d07-afa8-132b5dfca666\"\r\n },\r\n```\r\n\r\nThe requester reference can be removed and the subject reference changed to use the Patient's NHSNumber e.g. \r\n\r\n```json\r\n \"subject\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\r\n \"value\": \"9876543210\"\r\n }\r\n },\r\n```",
        "min" : 1,
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Minimal"
            ],
            "aggregation" : [
              "contained",
              "referenced"
            ]
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.authorizingPrescription.reference",
        "path" : "MedicationDispense.authorizingPrescription.reference",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.type",
        "path" : "MedicationDispense.type",
        "definition" : "Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.\r\n\r\n```json\r\n\"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/medicationdispense-type\",\r\n \"code\": \"0001\",\r\n \"display\": \"Item fully dispensed\"\r\n }\r\n ]\r\n}\r\n```",
        "mustSupport" : true,
        "binding" : {
          "strength" : "required",
          "description" : "A ValueSet to identify the type of medication item status.",
          "valueSet" : "https://fhir.nhs.uk/ValueSet/DM-medicationdispense-type"
        }
      },
      {
        "id" : "MedicationDispense.type.coding.system",
        "path" : "MedicationDispense.type.coding.system",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.type.coding.code",
        "path" : "MedicationDispense.type.coding.code",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.quantity",
        "path" : "MedicationDispense.quantity",
        "definition" : "The amount of medication that has been dispensed. Includes unit of measure.\r\n\r\n```json\r\n\"quantity\": {\r\n \"value\": 28,\r\n \"unit\": \"capsule\",\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"3316911000001105\"\r\n}\r\n```\r\n\r\nIf no actual quantity has been dispensed then use a value of zero.",
        "min" : 1,
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.quantity.extension:runningTotal",
        "path" : "MedicationDispense.quantity.extension",
        "sliceName" : "runningTotal",
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/Extension-DM-RunningTotal"
            ]
          }
        ]
      },
      {
        "id" : "MedicationDispense.quantity.value",
        "path" : "MedicationDispense.quantity.value",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.quantity.unit",
        "path" : "MedicationDispense.quantity.unit",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.quantity.system",
        "path" : "MedicationDispense.quantity.system",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.quantity.code",
        "path" : "MedicationDispense.quantity.code",
        "min" : 1
      },
      {
        "id" : "MedicationDispense.daysSupply",
        "path" : "MedicationDispense.daysSupply",
        "definition" : "The amount of medication expressed as a timing amount.\r\n\r\n```json\r\n\"daysSupply\": {\r\n \"value\": 7,\r\n \"unit\": \"Day\",\r\n \"system\": \"http://unitsofmeasure.org\",\r\n \"code\": \"d\"\r\n}\r\n```",
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.whenPrepared",
        "path" : "MedicationDispense.whenPrepared",
        "definition" : "The time when the dispensed product was packaged and reviewed.\r\n\r\n```json\r\n\"whenPrepared\": \"2004-09-16T16:30:00+00:00\"\r\n```",
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.whenHandedOver",
        "path" : "MedicationDispense.whenHandedOver",
        "definition" : "The time the dispensed product was provided to the patient or their representative.\r\nIn HL7 v3 this is: *The date and local time that the medication is issued by the dispenser*.\r\n\r\n```json\r\n\"whenHandedOver\": \"2004-09-16T16:30:00+00:00\"\r\n```",
        "mustSupport" : true
      },
      {
        "id" : "MedicationDispense.receiver",
        "path" : "MedicationDispense.receiver",
        "max" : "1"
      },
      {
        "id" : "MedicationDispense.dosageInstruction",
        "path" : "MedicationDispense.dosageInstruction",
        "definition" : "At present only the `text` element **MUST** be provided. It is recommended the guidance in [FHIR Dose Syntax Implementation Guidance](https://developer.nhs.uk/apis/dose-syntax-implementation-1-3-2-alpha/dosage-overview.html) is followed. \r\n\r\nNote the structure of this section is similar as the [NHSDigital-MedicationRequest](https://simplifier.net/resolve?target=simplifier&scope=uk.nhsdigital.r4&canonical=https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest) from the `prescription-order`.\r\n\r\n```json\r\n\"dosageInstruction\": [\r\n {\r\n \"text\": \"4 times a day for 7 days\",\r\n \"timing\": {\r\n \"repeat\": {\r\n \"boundsDuration\": {\r\n \"value\": 7,\r\n \"unit\": \"d\"\r\n },\r\n \"frequency\": 4,\r\n \"period\": 1,\r\n \"periodUnit\": \"d\"\r\n }\r\n },\r\n \"doseAndRate\": [\r\n {\r\n \"doseQuantity\": {\r\n \"value\": 1,\r\n \"unit\": \"capsule\",\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"3316911000001105\"\r\n }\r\n }\r\n ]\r\n }\r\n]\r\n```",
        "type" : [
          {
            "code" : "Dosage",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Dosage"
            ]
          }
        ],
        "mustSupport" : true
      }
    ]
  },
  "text" : {
  }
}

XIG built as of ??metadata-date??. Found ??metadata-resources?? resources in ??metadata-packages?? packages.